//
//  MeOrderHeaderView.m
//  ai2ban
//
//  Created by Heartbeats on 2018/1/8.
//  Copyright © 2018年 mac book pro. All rights reserved.
//

#import "MeOrderHeaderView.h"

@implementation MeOrderHeaderView

- (void)awakeFromNib {
    [super awakeFromNib];
    
   [self.defualOrderBtn setTitleColor:mainColor forState:UIControlStateNormal];
}

-(void)changeSelectStyle:(BOOL)isOrdinary {
    [UIView animateWithDuration:0.25 animations:^{
        if (isOrdinary) {
            self.styleLineView.centerX = self.ordinaryBtn.centerX;
            return;
        }
        self.styleLineView.centerX = self.convertBtn.centerX;
    }];
}

- (IBAction)styleAction:(UIButton *)sender {
    [UIView animateWithDuration:0.25 animations:^{
       self.mainLineView.centerX = sender.centerX;
        if (sender == self.defualOrderBtn) {
            [self.defualOrderBtn setTitleColor:mainColor forState:UIControlStateNormal];
            [self.changeBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        }else {
            [self.changeBtn setTitleColor:mainColor forState:UIControlStateNormal];
            [self.defualOrderBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        }
    }];
}

- (IBAction)selectStateAction:(UIButton *)sender {
    [UIView animateWithDuration:0.25 animations:^{
        self.statceLineView.centerX = sender.centerX;
    }];
}


@end
